package com.rill.dao.imp;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.rill.dao.RoleDAO;
import com.rill.pojo.po.RoleInfo;

/**
 * @author rill
 * @date 2010-7-15
 */

/*public class RoleDAOImp extends HibernateDaoSupport implements RoleDAO {
	public List getRoleList(){
		String hql = " from RoleInfo r";
		return this.getHibernateTemplate().find(hql);
	}
	
	public RoleInfo addRole(RoleInfo roleInfo){
		this.getHibernateTemplate().save(roleInfo);
		return roleInfo;
	}
	
	public RoleInfo updateRole(RoleInfo roleInfo){
		this.getHibernateTemplate().update(roleInfo);
		return roleInfo;
	}

	@Override
	public RoleInfo getRoleById(int id) {
		return this.getHibernateTemplate().get(RoleInfo.class, id);
	}
	
	 (non-Javadoc)
	 * @see com.rill.dao.RoleDAO#TestRole(java.lang.String)
	 
	@Override
	public void testRole(String name) {
		//System.out.println(name);
		
	}

}*/
public class RoleDAOImp extends SqlSessionDaoSupport implements RoleDAO {
	
	@Override
	public RoleInfo getRoleById(int id) {
		return (RoleInfo) this.getSqlSession().selectOne("getRole",id);
	}

	@Override
	public List<RoleInfo> getRoleList() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public RoleInfo addRole(RoleInfo roleInfo) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public RoleInfo updateRole(RoleInfo roleInfo) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void testRole(String name) {
		// TODO Auto-generated method stub
		
	}
	
	

}

